#include "mousepos.h"

MousePos::MousePos()
{

}


void MousePos::setMyselfPos(){
    GetCursorPos(&myselfPos);
}

void MousePos::setEnemyPos(){
    GetCursorPos(&enemyPos);
}

//void MousePos::setMapPosA(){
//    GetCursorPos(&mapPosA);
//}

//void MousePos::setMapPosB(){
//    GetCursorPos(&mapPosB);
//}

POINT MousePos::getMyselfPos(){
    return myselfPos;
}

POINT MousePos::getEnemyPos(){
    return enemyPos;
}

//POINT MousePos::getMapPosA(){
//    return mapPosA;
//}

//POINT MousePos::getMapPosB(){
//    return mapPosB;
//}

int MousePos::CountDis(double scale){
    double dis = sqrt(pow(myselfPos.x-enemyPos.x,2) + pow(myselfPos.y-enemyPos.y,2));

    int realdis = dis*scale;
    return realdis;
}
